package cn.mcch.investigator.activity;

import android.view.View;
import android.widget.AdapterView;

import java.util.LinkedHashMap;
import java.util.Map;

import cn.mcch.investigator.R;
import cn.mcch.investigator.application.InvestigatorApplication;
import cn.mcch.investigator.listener.OnResponseListener;
import cn.mcch.investigator.model.impl.OrderExportModelImpl;
import cn.mcch.investigator.utils.ConstantUtil;
import cn.mcch.investigator.viewdelegate.impl.OrderExportPresenterImpl;
import cn.mcch.investigator.viewdelegate.impl.OrderExportViewDelegateImpl;

/**
 * Created by Administrator on 2016/12/25.
 */
public class OrderExportActivity extends BaseActivity<OrderExportViewDelegateImpl, OrderExportModelImpl, OrderExportPresenterImpl> {

    @Override
    public Class<OrderExportPresenterImpl> getPresenterClass() {
        return OrderExportPresenterImpl.class;
    }

    @Override
    public void createFirstView() {

    }

    @Override
    public void initTitleBar() {
        mPresenter.initTitleBar(getApplicationContext(), isTranslucentStatus, "案件列表", R.drawable.back, 0, R.color.login_btn_text, this);
    }

    @Override
    public void initData() {
        Map<String, String> params = new LinkedHashMap<>();
        params.put("user_id", InvestigatorApplication.getInstance().getUserBeanbean().user_id);
        mPresenter.initData(ConstantUtil.ACT_EXP_ORDER_LIST, params, getApplicationContext(), this, R.layout.activity_order_export);
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        super.onItemClick(parent, view, position, id);
        mPresenter.setIetmClickPosition(position);
        this.finish();
    }
}
